//
//  SCCarAddImageModel.h
//  Shuaiche
//
//  Created by dangshuai on 2019/4/23.
//  Copyright © 2019 zzs. All rights reserved.
//

#import "SCModel.h"
@class PHAsset;

@interface SCCarAddImageItemModel : SCModel
@property (nonatomic, assign) BOOL isAddButton;
@property (nonatomic, strong) UIImage *image;
@property (nonatomic, copy) NSString *imageUrlPath; // 服务端地址
@property (nonatomic, strong) PHAsset *asset; //图册中选取时，赋值，否则不会去重；
@property (nonatomic, copy) NSString *name;
@property (nonatomic, strong) NSDictionary *positionInfo;
@property(nonatomic, assign) NSInteger positionId;  // 999保留， 给添加按钮使用
@property (nonatomic, copy) NSString *posotionPlaceholder;
@property(nonatomic, assign) BOOL fillImage;

/* title
 CAR_PIC    车辆图片
 CERT_PIC    证件图片
 OTHER_PIC    其他图片*/
@property (nonatomic, copy) NSString *title;
/* description
 ID_FRONT    身份证正面
 ID_BACK    身份证反面
 CAR_LICENSE_FRONT:    行驶证正面
 CAR_LICENSE_BACK    行驶证反面
 CAR_REG_BOOK    登记证
 OTHER_CERT    其他证件*/
@property (nonatomic, copy) NSString *carDescription;

@property (nonatomic, strong) NSIndexPath *positionIndex;
@property (nonatomic, assign) BOOL isSameFirst; //相同图片中的第一张, 默认为NO

+ (instancetype)addModel;
- (void)addSelecteImage:(UIImage *)image;
- (void)addSelecteImage:(UIImage *)image withPath:(NSString *)imagePath;
- (void)removeSelecteImage;
@end

//NS_ASSUME_NONNULL_BEGIN

@interface SCCarAddImageModel : SCModel
@property (nonatomic, assign) NSInteger unionId;
@property (nonatomic, copy) NSString *unionName;
@property (nonatomic, assign) BOOL isOfficial;
@property (nonatomic, copy) NSString *licensePlate;

@property (nonatomic, assign) BOOL isShowAll;
@property (nonatomic, strong) NSMutableArray <SCCarAddImageItemModel *> *imagesArray;
@property (nonatomic, strong) NSMutableArray <SCCarAddImageItemModel *> *showImagesArray;
@property (nonatomic, assign) NSInteger imagesCount;
@property (nonatomic, assign) BOOL isUpload;
@property (nonatomic, assign) NSInteger selectPositionCount;
@property (nonatomic, assign) NSInteger selectNormalCount;
@property (nonatomic, strong) NSMutableArray *selectedAssets;

- (void)addImageSelectItem;
//- (void)addImageModel:(SCCarAddImageItemModel *)item;

@end

//NS_ASSUME_NONNULL_END
